<!DOCTYPE html>
<html lang="en">
<head>
  <title>Home Assistant</title>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width,user-scalable=no"/>
  <link href="assets/style.css" rel="stylesheet"/>
  <link href="assets/error.css" rel="stylesheet"/>
  <script>
    const { ipcRenderer } = require('electron');

    function reconnect() {
      ipcRenderer.send('reconnect');
    }

    function restart() {
      ipcRenderer.send('restart');
    }
  </script>
</head>

<body>
<div class="vertical-center">
  <div class="content">
    <div class="center">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
        <circle class="path circle" fill="none" stroke="#D06079" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/>
        <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="34.4"
              y1="37.9" x2="95.8" y2="92.3"/>
        <line class="path line" fill="none" stroke="#D06079" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" x1="95.8"
              y1="38" x2="34.4" y2="92.2"/>
      </svg>
    </div>
    <div class="center">
      <p class="error">
        Home Assistant instance is not available, please check your connection.
      </p>
    </div>
    <div class="center">
      <button class="pure-material-button-contained" onclick="reconnect()">Reconnect</button>
      <button class="pure-material-button-contained" onclick="restart()" style="margin-left: 10px">Restart</button>
    </div>
  </div>
</div>
</body>
</html>
